﻿@model ElCharro01.Models.Cart
<div class="sfondo">
    @if (Model != null)
    {
        if (Model.CartDetail.Count() != 0)
        { 
        <div class="minicart-header">
            <h2 class="centered">
                Il Tuo Carrello
            </h2>
        </div>
        <div id="minicart-contents-wrap">
            <div id="minicart-contents" class="minicart mini-cart-full">
                <div class="cart-details">
                    <div class="totals-wrap">
                        <p class="subtotal-info centered">
                            Totale @Model.Totale €
                        </p>
                    </div>
                    <div class="mini-cart-items-wrapper">
                        <ul class="minicart-items">
                            @foreach (var item in Model.CartDetail)
                            {
                                <li class="item active">
                                    <div class="item-image">
                                        <img height="150" width="110" src="/Content/Images/Raw/@item.Variant.Image.First().Path" alt="@Model.CartDetail.First().Variant.Product.Nome"/>
                                    </div>
                                    <ul class="item-desc">
                                        <li class="name">@item.Variant.Product.Nome</li>
                                        <li class="price">@item.Variant.PrezzoUnitario</li>
                                        <li class="price">(x @item.Quantita)</li>
                                    </ul>
                                    <div class="">
                                    </div>
                                </li>
                            }
                        </ul>
                    </div>
                </div>
                <div class="minicart-items-wrapper">
                </div>
            </div>
        </div>
        }
    }

    else
    {
        <div>
            Carrello Vuoto
        </div>
    }
</div>
